﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Kendo.Mvc.UI;
using Kendo.Mvc.Extensions;

namespace MvcApplication1.Controllers
{
    public class HomeController : Controller
    {
        //
        // GET: /Home/

        public ActionResult Index()
        {
            return View();
        }

        public JsonResult GetEntities([DataSourceRequest] DataSourceRequest request)
        {
            var entities = new List<MyEntity>()
            {
                new MyEntity
                {
                    Id=1, FirstName="First Name",LastName="Last Name",Category=
                   
                        "General"
}
                
            };
            return Json(entities.ToDataSourceResult(request), JsonRequestBehavior.AllowGet);
        }

    }

    public class MyEntity
    {
        public int Id { get; set; }
        public string FirstName { get; set; }
        public string LastName { get; set; }
        public string Category { get; set; }
    }
}
